package cn.edu.scau.cmi.pengyujin.composite.safe;

import java.util.ArrayList;
import java.util.List;

public class Organization extends SafeComponent{

	String name;
	List<Person> personList = new ArrayList<Person>();
	List<Team> teamList = new ArrayList<Team>();
	
	public void addPerson(Person person) {
		this.personList.add(person);
	}
	
	public void removePerson(Person person) {
		this.personList.remove(person);
	}
	
	public void addTeam(Team team) {
		this.teamList.add(team);
	}
	
	public void removePerson(Team team) {
		this.teamList.remove(team);
	}
	
	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public List<Person> getPersonList() {
		return personList;
	}

	public void setPersonList(List<Person> personList) {
		this.personList = personList;
	}

	public List<Team> getTeamList() {
		return teamList;
	}

	public void setTeamList(List<Team> teamList) {
		this.teamList = teamList;
	}

	@Override
	public void doSomething() {
		// TODO Auto-generated method stub
		System.out.println("我是组织："+name);
	}

	

	

}
